1. Field of the Invention
The present invention relates to a printing apparatus having a wireless communication function, and more particularly, to a printing apparatus that performs security setting when the printing apparatus performs wireless communication.
2. Description of the Related Art
In recent years, a wireless local area network (LAN) communication function has been installed into many information devices. Printing apparatuses are also no exception, and product which include a wireless LAN communication interface as standard equipment and can wirelessly connect with a host computer have increased.
However, when a user performs security setting of the wireless LAN communication, some knowledge of the wireless LAN is required, which is very hard and difficult to understand for beginners. Therefore, a protocol for automatically performing complicated security setting of the wireless LAN has been defined. As a representative protocol, a system referred to as Wireless Fidelity (Wi-Fi) Protected Setup (WPS) is in widespread use.
The WPS includes two types of authentication methods for connecting a device to a wireless LAN access point (hereinafter, simply referred to as an access point). One is a push-button method and the other is a personal identification number (PIN) code method.
The PIN code method is to perform setting after performing authentication by the following processing. More specifically, according to the PIN code method, when a printing apparatus inputs a four- or eight-digit number referred to as a PIN code generated in advance to an access point of a connection destination, authentication of the printing apparatus and wireless LAN connection setting (security setting) are automatically performed between the printing apparatus and the access point.
By the way, there are some printing apparatuses which do not include a display device such as an liquid crystal display (LCD) for displaying character strings on the printing apparatus main body with the purpose of cost reduction. In such a printing apparatus which does not include a display device, when the PIN code method of the WPS is executed, the PIN code cannot be input to an access point, since the generated PIN code cannot be displayed. Therefore, Japanese Patent Application Laid-Open No. 2007-223222 adopts a method, instead of displaying information necessary for wired LAN setting, for printing the information on a sheet to allow a user to visually check it.
If a PIN code is not input to an access point within a predetermined time, after starting activation of the WPS in the PIN code method, a time-out occurs and setting of the wireless LAN fails. This is a behavioral specification of the WPS for making a dangerous time period in terms of security such as illegal connection (unauthorized access) from the outside as short as possible.
Japanese Patent Application Laid-Open No. 2007-223222 adopts a method for printing a PIN code on a sheet when an instruction to start activation of the WPS in the PIN code method is issued. However, when the PIN code is printed by the printing apparatus, sometimes sheets may not be stored in a sheet feed cassette, or paper clogging error may occur. If such an error occurs when the PIN code is printed, there is a possibility that it takes time to resolve the error, the time-out based on the above-described behavioral specification occurs, and setting of the wireless LAN fails. Conventionally, failure of the wireless LAN setting based on such an error of printing has not been taken into consideration.